import Vue from 'vue'
import App from './App.vue'
import {Button,Form,FormItem,Input,Message,Dropdown,
DropdownMenu,DropdownItem,Icon,Aside,Main,Menu,MenuItem,MenuItemGroup,
Submenu,Card,Breadcrumb,BreadcrumbItem,Divider,Descriptions,DescriptionsItem,Tag,
Dialog,MessageBox,Cascader,Tabs,TabPane,Table,TableColumn,Pagination,Select,Option,
Loading,Calendar,Progress,Badge,Drawer,Empty,Checkbox,Header} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import jwt_decode from "jwt-decode"
import router from './router'
import store from './store/index'
import * as echats from 'echarts';
import JsonExcel from 'vue-json-excel'


Vue.config.productionTip = false
axios.defaults.baseURL = 'http://127.0.0.1:3000'
axios.interceptors.request.use(config=>{
  config.headers.Authorization=localStorage.getItem('loginToken')
  return config
})
Vue.use(Button)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Icon)
Vue.use(Aside)
Vue.use(Main)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(MenuItemGroup)
Vue.use(Submenu)
Vue.use(Card)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Divider)
Vue.use(Descriptions)
Vue.use(DescriptionsItem)
Vue.use(Tag)
Vue.use(Dialog)
Vue.use(Cascader)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Pagination)
Vue.use(Select)
Vue.use(Option)
Vue.use(Calendar)
Vue.use(Progress)
Vue.use(Badge)
Vue.use(Drawer)
Vue.use(Empty)
Vue.use(Checkbox)
Vue.use(Header)
Vue.component('downloadExcel', JsonExcel)

Vue.config.productionTip = false
Vue.prototype.$confirm=MessageBox.confirm
Vue.prototype.$message=Message
Vue.prototype.$http = axios
Vue.prototype.$jwtCode=jwt_decode
Vue.prototype.$loading=Loading
Vue.prototype.$echats =echats

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
